<?php defined('BASEPATH') OR exit('No direct script access allowed');
require APPPATH.'/libraries/REST_Controller.php';

class neighborhood extends REST_Controller
{     
	function get_by_district_get()
	{
		if(!$this->get('district_id')) {
			$this->response(array('status'=>"false",
					'message' => 'district_id not provided'), 200);
		}
		$this->load->model('neighborhooddao');
		$success = $this->neighborhooddao->get_by_district($this->get('district_id'));
		$this->response(array('neighborhood'=>$success,'status'=> $success ? 'true' : 'false'), 200);
	}
}
?>